package com.linq.cool.system.dto;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @Author: yqlin
 * @Date: 2021/1/28 12:30
 * @Description: 用户修改DTO
 * @Version: 1.0.0
 */
@Data
@Accessors(chain = true)
public class SysUserUpdateDTO implements Serializable {
    private static final long serialVersionUID = -8365653044915061726L;
    /**
     * 部门id
     */
    private Long deptId;

    @NotNull(message = "用户id不能为空")
    private Long id;

    @NotBlank(message = "用户昵称不能为空")
    @Size(min = 0, max = 30, message = "用户昵称不能超过30个字符")
    private String nickname;

    @NotBlank(message = "手机号不能为空")
    private String phone;

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    private String email;
    /**
     * 用户性别
     */
    @NotNull(message = "性别不能为空")
    private Integer gender;
    /**
     * 用户状态
     */
    private Integer status;
    /**
     * 备注
     */
    private String remark;

    /**
     * 所属岗位
     */
    private List<Long> postIds;
    /**
     * 所属角色
     */
    private List<Long> roleIds;
}
